let left = document.querySelector('.left');
let right = document.querySelector('.right');
let item = document.querySelectorAll('.item');
let boxTop = document.querySelector('.boxTop');
let n = 1;
let sum = 0;
right.onclick=function(){
    if(n<4){
        sum = boxTop.style.left = (-450*n)+'px';
        n++;
    }else{
        n=1;
        boxTop.style.left = 0+'px';
        sum = boxTop.style.left;
    }
}
left.onclick=function(){
    if(n<=4&&n>1){
        sum = (parseInt(sum)+450)+'px';
        boxTop.style.left = sum;
        n--;
    }else{
        n=1;
        sum = 0;
    }
}